Skip to content

Fix KStars disconnecting on large BLOB transfers#38

Merged
tepickering merged 1 commit intomasterfrom
fix-blob-base64
Feb 23, 2026
Merged

Fix KStars disconnecting on large BLOB transfers#38
tepickering merged 1 commit intomasterfrom
fix-blob-base64

Conversation

@tepickering
Copy link
Copy Markdown
Contributor

Fixes #35

Problem

base64.b64encode() produces a single unbroken line of base64 data. When KStars receives a <oneBLOB> element containing a large unbroken base64 string it closes the connection.

Fix

Switch to base64.encodebytes() which inserts a newline every 76 characters, producing line-wrapped base64 that KStars handles correctly.

# Before
b64data = base64.b64encode(self.data).decode()

# After
b64data = base64.encodebytes(self.data).decode()

base64.b64encode() produces a single unbroken line, which causes KStars
to close the connection when receiving large BLOBs. Switch to
base64.encodebytes() which inserts newlines every 76 characters,
matching the line-wrapped base64 that KStars expects.

Fixes #35

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tepickering tepickering merged commit d2a93f5 into master Feb 23, 2026
2 checks passed
@tepickering tepickering deleted the fix-blob-base64 branch February 23, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kstars closes connection to pyindi blob supporting devices

1 participant